#!/bin/bash
yum install -y perl-ExtUtils-MakeMaker perl-CPAN perl-DBD-MySQL
tar zxvf mha4mysql-node-0.58.tar.gz
cd mha4mysql-node-0.58
perl Makefile.PL
make
make install
cd ..
#install cpanm
wget -c https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz
tar zxvf App-cpanminus-1.7044.tar.gz
cd App-cpanminus-1.7044
perl Makefile.PL
make
make install
cd ..
#install Socket
cpanm --mirror http://mirrors.aliyun.com/CPAN/ --mirror-only IO::Socket::INET6
cpanm --mirror http://mirrors.aliyun.com/CPAN/ --mirror-only ExtUtils::Constant
cpanm --mirror http://mirrors.aliyun.com/CPAN/ --mirror-only YAML
cpanm --mirror http://mirrors.aliyun.com/CPAN/ --mirror-only Socket

